const SIDEBAR_SPACING = 4;
const SIDEBAR_PADDING = 4;
-// The total sidebar width is the widget width plus the widget
-// padding, plus the sidebar padding
-const SIDEBAR_COLLAPSED_WIDTH = Widget.COLLAPSED_WIDTH + 2 * WidgetBox.WIDGETBOX_PADDING + 2 * SIDEBAR_PADDING;
-const SIDEBAR_EXPANDED_WIDTH = Widget.EXPANDED_WIDTH + 2 * WidgetBox.WIDGETBOX_PADDING + 2 * SIDEBAR_PADDING;
+// The total sidebar width is the widget width plus the widget padding
+// (counted twice for the widget box, and once again for the
+// out-of-screen padding), plus the empty space between the border of
+// the bar and of the windows
+const SIDEBAR_COLLAPSED_WIDTH = Widget.COLLAPSED_WIDTH + 3 * WidgetBox.WIDGETBOX_PADDING + SIDEBAR_PADDING;
+const SIDEBAR_EXPANDED_WIDTH = Widget.EXPANDED_WIDTH + 3 * WidgetBox.WIDGETBOX_PADDING + SIDEBAR_PADDING;
// The maximum height of the sidebar would be extending from just
// below the panel to just above the taskbar. Since the taskbar is
// during the animation.
this.box = new Big.Box ({ padding_top: SIDEBAR_PADDING,
padding_bottom: SIDEBAR_PADDING,
- padding_right: SIDEBAR_PADDING,
+ padding_right: 0,
padding_left: 0,
spacing: SIDEBAR_SPACING });
this.actor.add_actor(this.box);
const BLACK = new Clutter.Color();
BLACK.from_pixel(0x000000ff);
-const WIDGETBOX_PADDING = 4;
+const WIDGETBOX_PADDING = 2;
const ANIMATION_TIME = 0.5;
const POP_IN_LAG = 250; /* milliseconds */
this.actor = new Clutter.Group();
this._hbox = new Big.Box({ background_color: WIDGETBOX_BG_COLOR,
- padding: WIDGETBOX_PADDING,
+ padding_top: WIDGETBOX_PADDING,
+ padding_bottom: WIDGETBOX_PADDING,
+ padding_right: WIDGETBOX_PADDING,
+ // Left padding is here to make up for
+ // the X offset used for the sidebar
+ // to hide its rounded corners
+ padding_left: 2 * WIDGETBOX_PADDING,
spacing: WIDGETBOX_PADDING,
- corner_radius: WIDGETBOX_PADDING / 2,
+ corner_radius: WIDGETBOX_PADDING,
orientation: Big.BoxOrientation.HORIZONTAL,
reactive: true });
this.actor.add_actor(this._hbox);